package com.erp.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.erp.user.domain.ErpDistributionUser;
import com.erp.user.domain.ErpDistributionUserBasicInfo;
import com.erp.user.domain.bo.ErpDistributionUserBo;
import com.erp.user.domain.vo.CityVo;
import com.erp.user.domain.vo.ErpDistributionUserVo;
import com.erp.user.mapper.ErpDistributionUserBasicInfoMapper;
import com.erp.user.mapper.ErpDistributionUserMapper;
import com.erp.user.service.ICityService;
import com.erp.user.service.IErpDistributionUserBasicInfoService;
import com.erp.user.service.IErpDistributionUserService;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.utils.uuid.RandomUtils;
import com.ruoyi.common.core.web.oldPage.TableDataInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;


/**
 * @Description: 分销员基本信息Service业务层处理
 * @Author: j.zh
 * @Date: 2024/5/2
 * @Version: 4.0.0
**/
@RequiredArgsConstructor
@Service
public class ErpDistributionUserBasicInfoServiceImpl implements IErpDistributionUserBasicInfoService {

	@Resource
	ErpDistributionUserBasicInfoMapper baseMapper;

	/**
	 * @Description: 根据分销员ID，获取分销员基本信息
	 * @Author: j.zh
	 * @Date: 2024/5/3
	 * @param distributionUserId
	 * @return com.erp.user.domain.ErpDistributionUserBasicInfo
	 * @Version: 4.0.0
	 **/
	@Override
	public ErpDistributionUserBasicInfo getByDistributionUserId(Long distributionUserId){
		return baseMapper.selectOne(new LambdaQueryWrapper<ErpDistributionUserBasicInfo>()
				.eq(ErpDistributionUserBasicInfo::getDistributionUserId, distributionUserId));
	}

}
